package cn.edu.ctbu.datajpa01.StudentNameController;

import cn.edu.ctbu.datajpa01.domain.Student;
import cn.edu.ctbu.datajpa01.service.StudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/name")
public class StudentNameController {

    @Autowired
    private StudentService studentService;
    @RequestMapping("/student/list")

    public List<Student> findByName(){
        return studentService.findByName("易丙超");
    }

}
